﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _3._2_continue
{
    class Program
    {
        static void Main(string[] args)
        {
            int num, sum = 0;
            Console.WriteLine("输入一系列数，0表示结束");
            while (true) {
                num = int.Parse(Console.ReadLine());
                if (num == 0)
                {
                    break;
                }
                else if (num < 0)
                {
                    continue;
                }
                else
                    sum += num;
            }
            Console.WriteLine("输入数据中所有正数的和为："+sum);
            Console.ReadLine();
        }
    }
}
